package com.zzw.hj26;

import java.util.*;

/**
 * @Project: hw_java
 * @Description: 字符串排序
 * @Author: zzw
 */


// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        String val = in.nextLine();
        char[] cs = val.toCharArray();
        Map<Integer, String> map = new HashMap<>();
        List<Character> li = new ArrayList<>();
        for (int i = 0; i < cs.length; i++) {
            if ((cs[i] < 'a' || cs[i] > 'z') && (cs[i] < 'A' || cs[i] > 'Z')) {
                map.put(i, String.valueOf(cs[i]));
            } else {
                li.add(cs[i]);
            }
        }
        li.sort(Comparator.comparingInt(Character::toLowerCase));
        StringBuilder result = new StringBuilder();
        for (int i = 0; result.length() < val.length(); ) {
            if (map.containsKey(result.length())) {
                result.append(map.get(result.length()));
            } else if (i < li.size()) {
                result.append(li.get(i));
                i++;
            }
        }
        System.out.print(result);
    }
}